load(
    "//bazel:tachyon_cc.bzl",
    "tachyon_cc_benchmark",
    "tachyon_cc_library",
    "tachyon_cc_unittest",
)

package(default_visibility = ["//visibility:public"])

tachyon_cc_library(
    name = "blinder",
    hdrs = ["blinder.h"],
    deps = [
        ":random_field_generator_base",
        ":row_types",
    ],
)

tachyon_cc_library(
    name = "blinded_polynomial",
    hdrs = ["blinded_polynomial.h"],
    deps = ["@com_google_absl//absl/strings"],
)

tachyon_cc_library(
    name = "random_field_generator_base",
    hdrs = ["random_field_generator_base.h"],
)

tachyon_cc_library(
    name = "rotation",
    hdrs = ["rotation.h"],
    deps = [
        ":row_types",
        "//tachyon/base:logging",
        "//tachyon/base/numerics:checked_math",
        "//tachyon/base/strings:string_number_conversions",
        "//tachyon/math/polynomials/univariate:univariate_evaluation_domain",
    ],
)

tachyon_cc_library(
    name = "row_types",
    hdrs = ["row_types.h"],
)

tachyon_cc_library(
    name = "univarate_polynomial_commitment_scheme_extension",
    hdrs = ["univarate_polynomial_commitment_scheme_extension.h"],
    deps = [
        "//tachyon/crypto/commitments:univariate_polynomial_commitment_scheme",
        "//tachyon/math/base:rational_field",
    ],
)

tachyon_cc_library(
    name = "value",
    hdrs = ["value.h"],
    deps = ["//tachyon/math/base:rational_field"],
)

tachyon_cc_unittest(
    name = "base_unittests",
    srcs = [
        "blinder_unittest.cc",
        "rotation_unittest.cc",
        "value_unittest.cc",
    ],
    deps = [
        ":blinder",
        ":rotation",
        ":value",
        "//tachyon/base:random",
        "//tachyon/base/containers:container_util",
        "//tachyon/math/finite_fields/test:gf7",
        "//tachyon/math/polynomials/univariate:univariate_evaluations",
    ],
)

tachyon_cc_benchmark(
    name = "nested_for_loop_openmp_benchmark",
    srcs = ["nested_for_loop_openmp_benchmark.cc"],
    deps = [
        "//tachyon/base:parallelize",
        "//tachyon/math/elliptic_curves/bn/bn254:fr",
    ],
)

tachyon_cc_benchmark(
    name = "parallelize_benchmark",
    srcs = ["parallelize_benchmark.cc"],
    deps = [
        "//tachyon/base:parallelize",
        "//tachyon/math/elliptic_curves/bn/bn254:fr",
    ],
)
